import time #библиотека учета времени
def SVT (numbers):
    sw=True
    while sw:
        sw=False
        for i in range (len(numbers)-1):
            if numbers [i]>numbers[i+1]:
                numbers[i],numbers[i+1]=numbers[i+1],numbers[i]
                sw=True
def DK(fName):
    file=open(fName,'r')
    data=file.lines()
    return data
m1=DK("m1_sorted.txt")
m2=DK("m2_reverse.txt")
m3=DK("m3_shuffle.txt")
t_start=time.time()
SVT(m1)
t_finish=time.time()
print("m1_sorted",round((t_finish-t_start)*1000),"milliseconds")
t_start=time.time()
SVT(m2)
t_finish=time.time()
print("m2_reverse",round((t_finish-t_start)*1000),"milliseconds")
t_start=time.time()
SVT(m3)
t_finish=time.time()
print("m3_shuffle",round((t_finish-t_start)*1000),"milliseconds")
